#pragma once

#include <string>
#include <map>
#include "Enum.h"
#include "TextLog.h"
#include <fstream>

class GameObject {
protected:
	std::map<TypeHierarchy, int> m_types;
public:
	GameObject(GenericType type);
	virtual ~GameObject();
	int getType(TypeHierarchy typeCategory) const;
	TypeHierarchy getSpecificTypeCategory() const;
	int getSpecificType() const;
	virtual void render(float x, float y) = 0;
	std::string debugString() const;
	virtual void logDetails(TextLog& log) const;
	virtual std::string getDescription() const;
	virtual bool typeEqual(const GameObject& obj) const;
	virtual std::string getColoredName() const = 0;
	virtual std::string getColoredBasicName() const = 0;
	virtual std::string getName() const;
	std::string getBasicName() const;
	virtual void save(std::ofstream& file) const = 0;
};

inline int GameObject::getType(TypeHierarchy typeCategory) const {return m_types.count(typeCategory) > 0 ? m_types.at(typeCategory) : -1;}